﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Xms.Abp.Application.Dtos;

namespace Xms.Abp.Application.Services;

public interface IXmsCrudAppService<TEntityDto, TKey>
   : IXmsCrudAppService<TEntityDto, TKey, PagedSortedAndFilterParameter>
{
}

public interface IXmsCrudAppService<TEntityDto, TKey, in TGetListInput>
    : IXmsCrudAppService<TEntityDto, TKey, TGetListInput, TEntityDto>
    where TGetListInput : class, IPagedAndSortedResultRequest
{
}

public interface IXmsCrudAppService<TEntityDto, TKey, in TGetListInput, in TCreateInput>
    : IXmsCrudAppService<TEntityDto, TKey, TGetListInput, TCreateInput, TCreateInput>
    where TGetListInput : class, IPagedAndSortedResultRequest
{
}

public interface IXmsCrudAppService<TEntityDto, TKey, in TGetListInput, in TCreateInput, in TUpdateInput>
    : IXmsCrudAppService<TEntityDto, TEntityDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
    where TGetListInput : class, IPagedAndSortedResultRequest
{
}

public interface IXmsCrudAppService<TGetOutputDto, TGetListOutputDto, TKey, in TGetListInput, in TCreateInput, in TUpdateInput>
    : IXmsCrudAppService<TGetOutputDto, TGetListOutputDto, TGetOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
    where TGetListInput : class, IPagedAndSortedResultRequest
{
}

public interface IXmsCrudAppService<TGetOutputDto, TGetListOutputDto, TExportDto, TKey, in TGetListInput, in TCreateInput, in TUpdateInput>
    : IXmsCrudAppService<TGetOutputDto, TGetListOutputDto, TExportDto, TExportDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
    where TGetListInput : class, IPagedAndSortedResultRequest
{
}

public interface IXmsCrudAppService<TGetOutputDto, TGetListOutputDto, TExportDto, TImportDto, TKey, in TGetListInput, in TCreateInput, in TUpdateInput>
    : ICrudAppService<TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
    where TGetListInput : class, IPagedAndSortedResultRequest
{
    Task<TGetOutputDto> GetAsync(string no);
    new Task<PagedResult<TGetListOutputDto>> GetListAsync(TGetListInput input);
    Task<(byte[], string)> ExportAsync(TGetListInput input);
    Task ImportAsync(string file);
    Task<byte[]> TempletAsync();
    Task DeleteAsync(TKey[] ids);
    Task<TGetOutputDto> ToggleEnabledAsync(TKey id, bool isEnabled);
    Task<List<NameValue<TKey>>> GetNameValuesAsync(string filter = null);
    Task SubmitReviewAsync(TKey id);
    Task ReviewAsync(TKey id, ReviewParameter parameter);
    Task<List<NameValue>> GetNameNosAsync(string filter = null);
}
